A Java Expression Evaluator for Nonlinear Programming
نویسنده
چکیده
Finding the optimal value for a problem is usual in many areas of knowledge where in many cases it is needed to solve Nonlinear Optimization Problems. For some of those problems it is not possible to determine the expression for its objective function and/or its constraints, they are the result of experimental procedures, might be non-smooth, among other reasons. To solve such problems it was implemented an API contained methods to solve both constrained and unconstrained problems. This API was developed to be used either locally on the computer where the application is being executed or remotely on a server. To obtain the maximum flexibility both from the programmers’ and users’ points of view, problems can be defined as a Java class (because this API was developed in Java) or as a simple text input that is sent to the API. For this last one to be possible it was also implemented on the API an expression evaluator. One of the drawbacks of this expression evaluator is that it is slower than the Java native code. In this paper it is presented a solution that combines both options: the problem can be expressed at run-time as a string of chars that are converted to Java code, compiled and loaded dynamically. To wide the target audience of the API, this new expression evaluator is also compatible with the AMPL format.
منابع مشابه
\expression Templates" in Java
Template techniques in C++ allow a modest degree of gen-erative programming: creating specialized code for specialized problems. This use of templates has been controversial; indeed, one of the oft-cited reasons for migrating to Java is that it provides a simpler language, free of complexities such as templates. The essence of generative programming in C++ is not templates { the language featur...
متن کاملFunctional Adaptive Programming with DemeterF
In this paper we present a new functional traversal abstraction for processing OO data structures that decomposes traversal computation into three function objects and a traversal control function. Function objects compute and combine values over a general traversal while the control function allows programmers to limit the extent of a traversal. Our new abstraction is supported by a Java libra...
متن کاملThe JastAdd system—combining declarative and imperative compiler implementation
We describe JastAdd, a Java-based system for compiler implementation. JastAdd is centered around an object-oriented representation of the abstract syntax tree where reference variables can be used to link together different parts of the tree. JastAdd supports the combination of declarative techniques (using Reference Attributed Grammars) and imperative techniques (using ordinary Java code) in i...
متن کاملJust When You Thought Your Little Language Was Safe: "Expression Templates" in Java
Template techniques in C allow a modest degree of gen erative programming creating specialized code for specialized problems This use of templates has been controversial indeed one of the oft cited reasons for migrating to Java is that it provides a simpler language free of complexities such as templates The essence of generative program ming in C is not templates the language feature but rathe...
متن کاملInterface-Directed Partial Evaluation
Type-directed partial evaluation (TDPE) is a mechanism for generating specialized programs via ordinary program execution. It was originally developed for functional languages that subsume the lambda-calculus. In this paper, we show how to extend TDPE to work on object-oriented source languages, such as Java, and to generate residual programs directly into low-level representations, such as Jav...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2013